#ifndef GLWIDGET_HPP
#define GLWIDGET_HPP

#include <QGLWidget>
#include <QtGui>
#include <ShadowMapping/shaderExample.hpp>

using namespace std;

class GLWidget : public QGLWidget
{
    Q_OBJECT

public:
    GLWidget( QWidget *parent = 0 );
    ~GLWidget();

signals:

public slots:
    void addModel(const QString &filePath)
    {
        glslTest.addModel(filePath);
    }


protected:
    void initializeGL();
    void paintGL();
    void resizeGL(int width, int height);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void keyPressEvent(QKeyEvent *event);
private:
    QPoint lastPos;
    ShaderExample glslTest;

	QTimer timer;
	QTime last_time;
	int frame_count;
	int last_count;
};

#endif // GLWIDGET_HPP
